<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text">
    <button class="btn-send">发送</button>
    <script>
        var btn = document.querySelector('.btn-send');
        btn.onclick = function () {
            var count = 5;
            btn.disabled = true;
            btn.innerText = count + 's';
            setInterval(function () {
                if (count == 1) {
                    clearInterval();
                    btn.disabled = false;
                    btn.innerText = '发送';
                } else {
                    count--;
                    btn.innerText = count + 's';
                }
            },1000)
        }
    </script>
</body>

</html>